package com.web44.springboot.service;

import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

/**
 * @Title: AsyncService
 * @Description:
 * @Auther: py
 * @Version: 1.0
 * @create 2024/3/4 11:21
 */
@Service
public class AsyncService {

    @Async  // 异步操作
    public  void addBatch() throws InterruptedException {
        Thread.sleep(10000);
        System.out.println("批量添加完成....");
    }
}
